/**
 * 
 */
package org.insia.smartposse.metier.webservice;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import org.insia.smartposse.metier.Skill;
import org.insia.smartposse.metier.SkillCategory;

/**
 * @author raguerri
 * @since 18 avr. 07
 * @version 0.0.1
 * 
 */
public class LightSkillCategory 
implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1673092773861432311L;
	private long id;
	private String label;
	private int level;
	private List<LightSkill> skillSet = new ArrayList<LightSkill>();
	
	/**
	 * 
	 *
	 */
	public LightSkillCategory() {
		
	}
	
	/**
	 * 
	 * @param scate
	 */
	public LightSkillCategory(SkillCategory scate) {
		id = scate.getId();
		label = scate.getLabel();
		level = scate.getLevel();
		if (skillSet.size() != 0 ) {
			for (Skill skill : scate.getSkillSet()) {
				skillSet.add(skill.setLight());
			}
		}
	}

	/**
	 * @return the id
	 */
	public long getId() {
		return id;
	}

	/**
	 * @return the label
	 */
	public String getLabel() {
		return label;
	}

	/**
	 * @return the level
	 */
	public int getLevel() {
		return level;
	}

	/**
	 * @return the skillSet
	 */
	public List<LightSkill> getSkillSet() {
		return skillSet;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(long id) {
		this.id = id;
	}

	/**
	 * @param label the label to set
	 */
	public void setLabel(String label) {
		this.label = label;
	}

	/**
	 * @param level the level to set
	 */
	public void setLevel(int level) {
		this.level = level;
	}

	/**
	 * @param skillSet the skillSet to set
	 */
	public void setSkillSet(List<LightSkill> skillSet) {
		this.skillSet = skillSet;
	}
}
